package cn.gdsdxy.s02mybatis;


import cn.gdsdxy.s02mybatis.entity.Comment;
import cn.gdsdxy.s02mybatis.repository.CommentMapper2;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
public class CommentTest2 {
    @Autowired
    CommentMapper2 commentMapper2;
    @Test
    public void insertComment() {
        Comment comment=new Comment(0,"非常好","罗剑鹏");
        commentMapper2.insertComment(comment);
        System.out.println("新增元素的id值为+"+comment.getId());
    }
}
